package string;

import java.util.Arrays;

public class SplitDemo {
    public static void main(String[] args) {
        String line = "abc123def456ghi";
        //将line按照数字拆分
        String[] arr = line.split("[0-9]+");
        System.out.println(Arrays.toString(arr));

        line = "abc===def=ghi============================";
        arr = line.split("=");
        System.out.println(arr.length);
        System.out.println(Arrays.toString(arr));

        line = "abc.def.ghi";
        arr = line.split("\\.");
        System.out.println(Arrays.toString(arr));
    }
}
